package com.shujia.java.day19.demo3;
/**
* @Description: RunnableDemo  Runnable的资源共享
* @Author: 王火火
* @Date: 2019/8/22 10:27
 * 只创建一个类实例 自动的实现了资源共享
 *
 *
*/
public class RunnableDemo {
    public static void main(String[] args) {
        MyRunnable myRunnable = new MyRunnable();

        Thread thread = new Thread(myRunnable);
        Thread thread1 = new Thread(myRunnable);
        Thread thread2 = new Thread(myRunnable);

        thread.start();
        thread1.start();
        thread2.start();

    }
}
